import React from 'react'
import { Tabs } from 'antd';
import AllDevice from './AllDevice';
import ConentHeader from './ConentHeader';

const onChange = (key) => {
  console.log(key);
};

function DevMaintain(props) {
  const items = [
    {
      key: '1',
      label: `全部设备`,
      children:
        <AllDevice />
    },
    {
      key: '2',
      label: `待消缺的设备`,
      children: `Content of Tab Pane 2`,
    },
    {
      key: '3',
      label: `告警日志`,
      children: `Content of Tab Pane 2`,
    }
  ];
  return (
    <div style={{ margin: "15px 0", }}>
      <ConentHeader />
      <Tabs defaultActiveKey="1" items={items} onChange={onChange}
        style={{ fontSize: "12px", background: "white", margin: "15px 0", paddingBottom: "10px", }}
      />
    </div>
  )
}

// const mapStateToProps = ({ ConentHeaderChange: { conentHeaderState, conentHeaderType } }) => {
//   return {
//     conentHeaderState, conentHeaderType
//   }
// }
// const mapDispatchToProps = {
//   showHeader(state) {
//     return {
//       type: "change_conentheader",
//       conentHeaderState: state,
//       conentHeaderType: "devMonitor"
//     }
//   }
// }
// export default connect(mapStateToProps, mapDispatchToProps)(DevMaintain)
export default DevMaintain